<!-- papers-edit.html -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:include="inc/examHeader::header">
</head>
<script type="text/javascript" src="/exam/js/papers-add.js" ></script>
	<body>
	 	<div th:include="header :: header"></div>
		<div id="addPaper">
		<form action="#" th:action="@{/paperManager/updatePaper}" id="paper" method="post">
		<input type="hidden" name="id" th:value="${paper.id}"/>
		<div class="back" onclick="location='/paperManager/papers'"><img src="../images/back.png" /></div>
		<div class="header-title">
			<span>编辑试卷</span>
		</div>
		<div class="spare-a">
			<div class="save-bg"><a href="#" id="updatePaper" class="spare-tj">发 布</a></div>
			<div class="spare-add">
				<ul>
					<li>
						<div class="spare-addl"><span class="star">*</span>名称：</div>
						<div class="spare-addr"><input type="text" class="spare-add-input" name="name"  id="papers-name" th:value="${paper.name}" /></div>
					</li>
					<li>
						<div class="spare-addl"><span class="star">*</span>考试时长：</div>
						<div class="spare-addr"><input type="text" class="spare-add-input" name="totalTime" value="120" id="papers-totalTime" th:value="${paper.totalTime}"/></div>
					</li>
					<li id="zf" >
						<div class="spare-addl"><span class="star">*</span>总分：</div>
						<div class="spare-addr"><input type="text" class="spare-add-input" name="totalScore"  th:value="${paper.totalScore}" /></div>
					</li>
					<li>
						<div class="spare-addl"><span class="star">*</span>考试类型：</div>
						<div class="spare-addr">
							<select class="spare-add-select" name="examType" onchange="examT(this.value)" id="examType">
								<option th:selected="${paper.examType =='考试试卷'}">考试试卷</option>
								<option th:selected="${paper.examType =='练习试卷'}">练习试卷</option>
								<option th:selected="${paper.examType =='现场考试'}">现场考试</option>
							</select>
							<div class="select-arrow"></div>
						</div>
					</li>
					<li id="txsz">
						<div class="spare-addl"><span class="star">*</span>题型设置：</div>
						<div class="spare-addr">
							<div class="paper-list clearfix">
								<div class="paper-listl">题型：单选题</div>
								<div class="paper-listm"><label>分值：</label><input type="text" class="paper-input"  id="radioScore" name="radioScore" th:value="${paper.radioScore}"/></div>
								<div class="paper-listm"><label>题数：</label><input type="text" class="paper-input"  id="radioCount" name="radioCount" th:value="${paper.radioCount}"/></div>
							</div>
							<div class="paper-list clearfix">
								<div class="paper-listl">题型：多选题</div>
								<div class="paper-listm"><label>分值：</label><input type="text" class="paper-input"  id="checkScore" name="checkScore" th:value="${paper.checkScore}"/></div>
								<div class="paper-listm"><label>题数：</label><input type="text" class="paper-input"  id="checkCount" name="checkCount" th:value="${paper.checkCount}"/></div>
							</div>
							<div class="paper-list clearfix">
								<div class="paper-listl">题型：判断题</div>
								<div class="paper-listm"><label>分值：</label><input type="text" class="paper-input"  id="judgeScore" name="judgeScore" th:value="${paper.judgeScore}"/></div>
								<div class="paper-listm"><label>题数：</label><input type="text" class="paper-input"  id="judgeCount" name="judgeCount" th:value="${paper.judgeCount}"/></div>
							</div>
							<div class="paper-list clearfix">
								<div class="paper-listl">题型：问答题</div>
								<div class="paper-listm"><label>分值：</label><input type="text" class="paper-input"  id="askScore" name="askScore"  th:value="${paper.askScore}"/></div>
								<div class="paper-listm"><label>题数：</label><input type="text" class="paper-input"  id="askCount" name="askCount"  th:value="${paper.askCount}"/></div>
								<span id="note" style="color:red;display:none">(考试试卷不含有问答题)</span>
							</div>
						</div>
					</li>
					<li id="sjjg">
						<div class="spare-addl"><span class="star">*</span>试卷结构：</div>
						<div class="spare-addr">
							<div class="spare-addr-new">
								<a href="#" id="autoPaper" class="spare-tj">自动组卷</a>
								<a href="#" id="manual-btn" class="spare-tj">手动组卷</a>
							</div>
							<div id="questions">
							<div id="chosequestions">
								<div class="paper-d">
									<div class="paper-d-title">一、单选题</div>
								</div>
								<div class="paper-e clearfix" th:each="qestion:${radioList}">
									<div class="paper-el" th:text="${qestion.order}">1、</div>
									<div class="paper-em" th:text="${qestion.content}">涉密场所应当按照国家有关规定经相关部门的安全技术检测，与境外机构、人员住所保持（）的安全距离</div>
									<div class="paper-er">
										<a href="#" th:onclick="'javascript:upMove(\''+${qestion.id}+'\')'">上 移</a>
										<a href="#" th:onclick="'javascript:downMove(\''+${qestion.id}+'\')'">下 移</a>
										<a href="#" th:onclick="'javascript:delquestion(\''+${qestion.id}+'\')'">删 除</a>
									</div>
									<input name="qids" type="hidden" th:value="${qestion.id+'-'+qestion.order}"/>
								</div>
							</div>
							<div id="checkquestions">
								<div class="paper-d">
									<div class="paper-d-title">二、多选题</div>
								</div>
								<div class="paper-e clearfix" th:each="qestion:${checkList}">
									<div class="paper-el" th:text="${qestion.order}">1、</div>
									<div class="paper-em" th:text="${qestion.content}">单位保密委员会组成人员是</div>
									<div class="paper-er">
										<a href="#" th:onclick="'javascript:upMove(\''+${qestion.id}+'\')'">上 移</a>
										<a href="#" th:onclick="'javascript:downMove(\''+${qestion.id}+'\')'">下 移</a>
										<a href="#" th:onclick="'javascript:delquestion(\''+${qestion.id}+'\')'">删 除</a>
									</div>
									<input name="qids" type="hidden" th:value="${qestion.id+'-'+qestion.order}" />
								</div>
							</div>
							
							<div id="judequestions">
								<div class="paper-d">
									<div class="paper-d-title">三、判断题</div>
								</div>
								<div class="paper-e clearfix" th:each="qestion:${judeList}">
									<div class="paper-el" th:text="${qestion.order}">1、</div>
									<div class="paper-em" th:text="${qestion.content}">单位保密委员会组成人员是</div>
									<div class="paper-er">
										<a href="#" th:onclick="'javascript:upMove(\''+${qestion.id}+'\')'">上 移</a>
										<a href="#" th:onclick="'javascript:downMove(\''+${qestion.id}+'\')'">下 移</a>
										<a href="#" th:onclick="'javascript:delquestion(\''+${qestion.id}+'\')'">删 除</a>
									</div>
									<input name="qids" type="hidden" th:value="${qestion.id+'-'+qestion.order}" />
								</div>
							</div> 
							<div id="askquestions">
								<div class="paper-d">
									<div class="paper-d-title">四、问答题</div>
								</div>
								<div class="paper-e clearfix" th:each="qestion:${askList}" >
									<div class="paper-el" th:text="${qestion.order}">1、</div>
									<div class="paper-em" th:text="${qestion.content}">单位保密委员会组成人员是</div>
									<div class="paper-er">
										<a href="#">上 移</a>
										<a href="#">下 移</a>
										<a href="#">删 除</a>
									</div>
									<input name="qids" type="hidden" th:value="${qestion.id+'-'+qestion.order}" />
								</div>
							</div>
							
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
		</form>
		</div>
		<!--手动组卷显示-->
		<div id="manual-show">
			<!--返回-->
			<div class="back" onclick="hideManual()"><img src="../images/back.png" /></div>
			<div class="header-title">
				<span>手动组卷</span>
			</div>
			<div class="spare-a">
				<div class="questions-add">
					<div class="questionsa-add manual-fiexd clearfix">
						<ul>
							<li><a class="active" href="#" onclick="switchCode('单选题')" style="border-bottom-left-radius:5px;border-top-left-radius:5px">单选题</a></li>
							<li><a href="#" onclick="switchCode('多选题')">多选题</a></li>
							<li><a href="#" onclick="switchCode('判断题')">判断题</a></li>
							<li><a href="#" onclick="switchCode('问答题')" style="border-bottom-right-radius:5px;border-top-right-radius:5px">问答题</a></li>
						</ul>
					</div>
					<div class="questionsb-add"  style="display:block">
						<div class="manual-scroll srcoll-documentation" id="choseq"></div>
					</div>
					<div class="questionsb-add" >
						<div class="manual-scroll srcoll-documentation" id="moreq"></div>
					</div>
					<div class="questionsb-add" >
					 	<div class="manual-scroll srcoll-documentation" id="judgeq"></div>
					</div>
					<div class="questionsb-add" >
						<div class="manual-scroll srcoll-documentation" id="askq"></div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
